﻿<%@page import="com.zkingsoft.pojo.ElementTypeFactory"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="${path }/resource/plugin/hui/lib/html5.js"></script>
<script type="text/javascript" src="${path }/resource/plugin/hui/lib/respond.min.js"></script>
<script type="text/javascript" src="${path }/resource/plugin/hui/lib/PIE_IE678.js"></script>
<![endif]-->

<!-- 本框架基本脚本和样式 -->
<script type="text/javascript"
	src="${path }/resource/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript"
	src="${path }/resource/js/systools/EXBase.js"></script>




<link rel="stylesheet"
	href="${path }/resource/plugin/kindeditor/themes/default/default.css" />
<link rel="stylesheet"
	href="${path }/resource/plugin/kindeditor/plugins/code/prettify.css" />
<script src="${path }/resource/plugin/kindeditor/kindeditor.js"></script>
<script src="${path }/resource/plugin/kindeditor/lang/zh_CN.js"></script>
<script
	src="${path }/resource/plugin/kindeditor/plugins/code/prettify.js"></script>


<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
</head>
<body>
	<div class="pd-20">
		<form class="form form-horizontal" method="post"
			action="admin/team/addOrModify" id="dataform"
			onsubmit="javascripr:return false;">
			<c:if test="${obj ne null }">
				<input type="hidden" name="id" value="${obj.id }">
			</c:if>
			<div class="row cl">
			<label class="form-label col-2">球队</label>
				<div class="formControls col-3">
					<input type="text"  dataType="*"  class="input-text" name="name"
						value="${obj.name }" nullmsg="球队名称不能为空">
				</div>
				<div class="col-2">
					<span class="Validform_checktip"></span>
				</div>
			</div>
			
			<div class="row cl">
			<label class="form-label col-2">教练名称</label>
				<div class="formControls col-3">
					<input type="text"  dataType="*"  class="input-text" name="coachName"
						value="${obj.coachName }" nullmsg="教练名称不能为空">
				</div>
				<div class="col-2">
					<span class="Validform_checktip"></span>
				</div>
			</div>
			
			<div class="row cl">
				<label class="form-label col-2">分组</label>
				<div class="formControls col-3">
					<select class="select select-box" size="1" name="sortId" dataType="*" nullmsg="分组不能为空">
						<c:forEach items="${list }" var="item">
						<option
							<c:if test="${obj ne null && obj.sortId eq item.id }"> selected="selected" </c:if>
							value='${item.id }'>${item.name }</option>
						</c:forEach>
					</select>
				</div>
				<div class="col-2">
					<span class="Validform_checktip"></span>
				</div>
			</div>

			<div class="row cl">
				<label class="form-label col-2">球队简介</label>
				<div class="formControls col-5" >
					<!-- <input type="text" value=""/> -->
					<textarea name="recommend" class="textarea">${obj.recommend }</textarea>
				</div>
				<div class="col-2">
					<span class="Validform_checktip"></span>
				</div>
			</div>
			
			<div class="row cl">
				<label class="form-label col-2">展示图片</label>
				<div class="formControls col-9">
					<span class="btn-upload form-group"> <input
						onclick="EXCommon.chooesFile()"
						class="input-text upload-url radius" type="text" id="showFileName"
						readonly> <a onclick="EXCommon.chooesFile()" class="btn btn-primary radius"><i
							class="fa fa-cloud-upload"></i> 浏览文件</a>
					</span> <input type="button" class='btn btn-primary radius'
						onclick="EXCommon.upFile()" value="上传"> <a id="selectInServices"
						class="btn btn-primary radius" ><i 
						class="fa fa-cloud"></i> 远程图库</a>
				</div>
			</div>

			<div class="row cl">
			<div  class="col-2"></div>
			<div  class="col-md-offset-1 formControls col-9">
			<c:if test="${obj ne null }">
				<input type="hidden" value="${obj.picUrl}" name="picUrl" id="hiddenImg" />
				<img  width="150" id='img_1' src="${obj.picUrl	 }" />
			</c:if>
			<c:if test="${obj eq null }">
				<input type="hidden"  name="picUrl" id="hiddenImg" />
				<img width="150" id='img_1' style="display: none" />
			</c:if>
				</div>
			</div>
			<div class="row cl ">
				<div class="col-10 col-offset-2">
					<a href="javascript:void(0)" onclick="EXForm.submit()"
						class="btn btn-success radius" id="save-btn">保存</a>
				</div>
			</div>
		</form>

		<form class="form form-horizontal" method="post"
			style="display: none;" enctype="multipart/form-data"
			target="blankFrame"
			action="${path }/resource/plugin/kindeditor/upload_json.jsp?dir=image&flag=img_1&hiddenImg=hiddenImg">
			<input id="fileText" type="file" multiple name="file-1"
				onchange="EXCommon.selectFile('#showFileName')" /> <input type="submit"
				id="submitBtn" onclick="EXCommon.upolad('img_1','file_1')" />
		</form>
		<iframe src="" name="blankFrame" id="blankFrame"
			style="height: 100px; width: 100px; display: none;"> </iframe>


	</div>
	<script type="text/javascript">
		$(function() {
			EXForm.initForm();
			EXUI.openServiceImgSpace(function(url){
				$("#img_1").attr("src", url).show();
				$("#hiddenImg").val(url);
			},"#selectInServices");			
		});
	</script>
</body>
</html>